<!DOCTYPE html>
<html>
<script src="${request.getContextPath()}/themes/admin/js/dateutil.js" type="text/javascript"></script>
<#include "../head.html">
    <body>
    <table class="mc">
        <tr>
            <td class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <div class="nav-oneself">
							    <div class="nav-visitors-item">
							        <div class="bl hidden"></div>
							        <div class="vg">渠道推广统计</div>
							    </div>
							    <ul class="visitors-block hidden">
							        <li><a class="vg" href="${request.getContextPath()}/admin/statistics/sourceStatistics.html" id="adminuserlist" data-nav="${request.getContextPath()}/admin/statistics/sourceStatistics.html">
							        	渠道推广统计</a></li>
							    </ul>
							</div>
                        </div>
                </div>
                <!--左侧导航---}-->
            </td>
            <td class="mc-m">
                <div class="navToggle"></div>
            </td>
            <td class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="推广商推广统计">
                        <div id="breadcrumbNav">
						    <div class="home-icon"></div>
						    <ul>
						        <li>推广统计</li>
						        <li class="v">${moduleName!}</li>
						    </ul>
						</div>
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="toolbor-module search">
                                 	<div class="formTit">起始日期：</div>
                                    <input class="_search-value" name="startTime" id="startTime" value="${param.startTime}" onclick="change_picktime()"/>
                                    <div class="formTit">截止日期：</div>
                                    <input class="_search-value" name="endTime" id="endTime" value="${param.endTime}" onclick="change_picktime()"/>
                                    <div class="formTit">渠道：
                                   	<select name="source" id="source" style="height:25px;width:100px">
                                   		<option value="" >所有</option>
                                   		<#list sources as item>
                                   			<option value="${item.code}" <#if item.code == source> selected </#if>>${item.name}</option>
                                   		</#list>
                                   	</select>
                                   	</div>
                                    <input type="button" value="搜索"  class="input-button" onclick="searchResult();">
                                </div>
                            </div>
                            <!--工具栏--}-->
                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                       		<td>日期</td>
                                            <td>注册用户数</td>
                                        </tr>
                                        <#if list??>
                                        <#list list as item>
                                            <tr class="s">
                                                <td>${item.statisticsTime}</td>
                                                <td>${item.registerNum!0}</td>
                                            </tr>
                                        </#list>
                                        </#if>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>
                                 <!--翻页系统--{-->
                                 <div class="container s_formPage">
                                     <#import "../../common/page.html" as pager>
                                         <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                 </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->
                                
                                
                                <script>
                                    var url = 'sourceStatistics.html?search=true';
                                    function searchResult(){
                                        var startTime = $("#startTime").val();
                                        var endTime = $("#endTime").val();
                                        var source = $("#source").val();
                                        if (startTime!=null&&startTime!=""&&startTime!="undefine"){
                                            url += "&startTime="+startTime;
                                        }
                                        if (endTime!=null&&endTime!=""&&endTime!="undefine"){
                                            url += "&endTime="+endTime;
                                        }
                                        if (source!=null&&source!="undefine"){
                                            url += "&source="+source;
                                        }
                                        location.href=url;
                                    }
                                </script>
                            </div>

            </td>
        </tr>
        <tr>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </tr>
    </table>
    </body>
</html>
<#include "../jsPage.html">